"""
message was produced that store in Queue abc Vhost test.
"""
import time
import pika

credentials = pika.PlainCredentials(username="test", password="123456")
connection = pika.BlockingConnection(pika.ConnectionParameters(host='', virtual_host='test',
                                                               credentials=credentials))

channel = connection.channel()

channel.queue_declare(queue='abc')
for i in range(99):
    channel.basic_publish(exchange='', routing_key='abc', body=str(i).decode('utf-8'))
    time.sleep(1)

print("Sent end.")
connection.close()
